package com.stlm2.dems.entity;

/**
 * Author：fuchunyu
 * Date：2017/10/13
 * Description：
 */
public enum CardsCategory {
    FlashSale(0) {
        public String toString() {
            return "限时抢购";
        }
    },
    Monthly(1){
        public String toString(){return "每月精选";}
    };

    private final int val;

    CardsCategory(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static CardsCategory getByIntValue(int n) {
        switch (n) {
            case 0:
                return FlashSale;
            case 1:
                return Monthly;
            default:
                return null;
        }
    }
}
